//
//  TL_Localized_Manager.h
//  WXReader
//
//  Created by LL on 2020/9/7.
//  Copyright © 2020 Andrew. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, LocalizedLanguage) {
    LocalizedLanguageDefault            = 0,/**<跟随系统*/
    LocalizedLanguageSimplifiedChinese  = 1,/**<简体中文*/
    LocalizedLanguageTraditionalChinese = 2,/**<繁体中文*/
    LocalizedLanguageEnglish            = 3,/**<英文*/
    LocalizedLanguageTail               = 4,/**<泰语*/
    LocalizedLanguageSpanish            = 5,/**<西班牙语*/
    LocalizedLanguagePortugal           = 6,/**<葡萄牙语*/
};

NS_ASSUME_NONNULL_BEGIN

#define WXLocalizedString(key) [TL_LocalizedManager stringWithKey:key]

@interface TL_LocalizedManager : NSObject

/// 与服务端的约定字段(上传服务端时使用)
+ (NSString *)serverLocalized;

/// 获取当前语言包中的文字
/// @param key 需要翻译的文字
+ (NSString *)stringWithKey:(NSString *)key;

/// 获取指定语言环境下的文字
/// @param key 需要翻译的文字
/// @param language 语言类型
+ (NSString *)stringWithKey:(NSString *)key language:(LocalizedLanguage)language;

/// 获取用户本地语言
+ (LocalizedLanguage)userLanguage;

/// 获取APP本地语言(不会返回LocalizedLanguageDefault，如果没有找到则返回默认语言)
+ (LocalizedLanguage)localizedLanguage;

/// 设置APP语言
+ (void)setLanguage:(LocalizedLanguage)language;

@end

NS_ASSUME_NONNULL_END
